﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace IDAL
{
   public interface IBaseDAO<T>
    {
        void Add(T entity);
        void Delete(T entity);
        void Update(T entity);
        List<T> GetList(Func<T, bool> lambadaWhere);
        List<T> GetListByPageIndex<S>(Func<T, bool> lambadaWhere, Func<T, S> lambadaOrder, bool isAsc, int pageIndex, int pageSize, ref int pageCount);
        List<T> GetListByPageIndexBy<S>(Expression<Func<T, bool>> where, Func<T, S> lambadaOrder, bool isAsc, int pageIndex, int pageSize, out int count);
    }
}
